/*
 * @Author: lineCode 1145938682@qq.com
 * @Date: 2024-11-25 23:09:31
 * @LastEditors: lineCode 1145938682@qq.com
 * @LastEditTime: 2025-02-18 23:04:02
 * @FilePath: /backend/shorthand-modules/shorthand-modules-content/src/main/java/com/angus/modules/content/repository/ENOptionRepository.java
 */
package com.angus.modules.content.repository;

import com.angus.modules.content.domain.ENOption;
import com.angus.modules.content.mapper.ENOptionMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author liyanan
 * @date 2024/11/24 7:04 PM
 * @description
 */
@Repository
public class ENOptionRepository extends ServiceImpl<ENOptionMapper, ENOption> {

    public List<ENOption> getOptionsByQuestionId(List<Long> questionIds) {

        return  baseMapper.selectList(Wrappers.lambdaQuery(ENOption.class)
                .in(ENOption::getQuestionId, questionIds)
                .eq(ENOption::getDelFlag, 0));

    }

}
